New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename via_hub to via_device #24360
Rename via_hub to via_device #24360
Conversation
vol.Optional(CONF_VIA_HUB): cv.string, | ||
}), validate_device_has_at_least_one_identifier) | ||
MQTT_ENTITY_DEVICE_INFO_SCHEMA = vol.All( | ||
cv.deprecated(CONF_DEPRECATED_VIA_HUB, CONF_VIA_DEVICE), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecate the old config option.
hub_device_id=device.get('hub_device_id'), | ||
# renamed in 0.95 | ||
via_device_id=( | ||
device.get('via_device_id') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This automatically upgrades the existing device registry on loading. Alternately we could do an update script instead, what's better here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lot smaller than adding a script 👍 . Just make renamed -> Renamed
Can you link some information about this one? Like what is its purpose (is it just metadata?), how is it used in homessistant etc. But when considering renaming it, wouldn't |
@rytilahti all discussed in the linked arch issue. |
Sorry, my bad. But the naming was not discussed in that issue that much. How does someone interpret |
@rytilahti Read the last few comments on that issue 😁 |
OK have tested this now along with the front-end PR and I'm reasonably happy. The only things to resolve are what to do about upgrading the registry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
Please don't forget to update the dev docs. |
@balloob the front end PR home-assistant/frontend#3254 will need to be merged too to go along with it. Working on a dev doc PR right now. I grepped ha.io but not dev so didn't find it! |
* Rename via_hub to via_device * Fixed registry interactions
Breaking Change:
The breaking change is that via_hub is renamed to via_device. Since custom components can't access this at this stage it should in theory not be an issue.
Description:
As discussed in the arch issue, via_hub doesn't make that much sense as a name anymore since it's not strictly speaking actually a hub. This renames the variable.
Related issue (if applicable): fixes home-assistant/architecture#212
Checklist:
tox
. Your PR cannot be merged unless tests passIf the code does not interact with devices:
addedmodified to verify that the new code works.